3.225 \(\int \frac {(h+i x) (a+b \log (c (d+e x)^n))^2}{f+g x} \, dx\)

Optimal. Leaf size=215 \[ \frac {2 b n (g h-f i) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2}+\frac {(g h-f i) \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2}+\frac {i (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g}-\frac {2 a b i n x}{g}-\frac {2 b^2 i n (d+e x) \log \left (c (d+e x)^n\right )}{e g}-\frac {2 b^2 n^2 (g h-f i) \text {Li}_3\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^2}+\frac {2 b^2 i n^2 x}{g} \]

[Out]

-2*a*b*i*n*x/g+2*b^2*i*n^2*x/g-2*b^2*i*n*(e*x+d)*ln(c*(e*x+d)^n)/e/g+i*(e*x+d)*(a+b*ln(c*(e*x+d)^n))^2/e/g+(-f
*i+g*h)*(a+b*ln(c*(e*x+d)^n))^2*ln(e*(g*x+f)/(-d*g+e*f))/g^2+2*b*(-f*i+g*h)*n*(a+b*ln(c*(e*x+d)^n))*polylog(2,
-g*(e*x+d)/(-d*g+e*f))/g^2-2*b^2*(-f*i+g*h)*n^2*polylog(3,-g*(e*x+d)/(-d*g+e*f))/g^2

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2418, 2389, 2296, 2295, 2396, 2433, 2374, 6589} \[ \frac {2 b n (g h-f i) \text {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2}-\frac {2 b^2 n^2 (g h-f i) \text {PolyLog}\left (3,-\frac {g (d+e x)}{e f-d g}\right )}{g^2}+\frac {(g h-f i) \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2}+\frac {i (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g}-\frac {2 a b i n x}{g}-\frac {2 b^2 i n (d+e x) \log \left (c (d+e x)^n\right )}{e g}+\frac {2 b^2 i n^2 x}{g} \]

Antiderivative was successfully verified.

[In]

Int[((h + i*x)*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x),x]

[Out]

(-2*a*b*i*n*x)/g + (2*b^2*i*n^2*x)/g - (2*b^2*i*n*(d + e*x)*Log[c*(d + e*x)^n])/(e*g) + (i*(d + e*x)*(a + b*Lo
g[c*(d + e*x)^n])^2)/(e*g) + ((g*h - f*i)*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(f + g*x))/(e*f - d*g)])/g^2 + (
2*b*(g*h - f*i)*n*(a + b*Log[c*(d + e*x)^n])*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g^2 - (2*b^2*(g*h - f*i
)*n^2*PolyLog[3, -((g*(d + e*x))/(e*f - d*g))])/g^2

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2396

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*
(f + g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n])^p)/g, x] - Dist[(b*e*n*p)/g, Int[(Log[(e*(f + g*x))/(e*f -
d*g)]*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2433

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((k*x)/d)^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + (j*x)/e)^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {(h+225 x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx &=\int \left (\frac {225 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g}+\frac {(-225 f+g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g (f+g x)}\right ) \, dx\\ &=\frac {225 \int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{g}+\frac {(-225 f+g h) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx}{g}\\ &=-\frac {(225 f-g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^2}+\frac {225 \operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e g}+\frac {(2 b e (225 f-g h) n) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g^2}\\ &=\frac {225 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g}-\frac {(225 f-g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^2}-\frac {(450 b n) \operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e g}+\frac {(2 b (225 f-g h) n) \operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {e \left (\frac {e f-d g}{e}+\frac {g x}{e}\right )}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^2}\\ &=-\frac {450 a b n x}{g}+\frac {225 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g}-\frac {(225 f-g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^2}-\frac {2 b (225 f-g h) n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^2}-\frac {\left (450 b^2 n\right ) \operatorname {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e g}+\frac {\left (2 b^2 (225 f-g h) n^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g^2}\\ &=-\frac {450 a b n x}{g}+\frac {450 b^2 n^2 x}{g}-\frac {450 b^2 n (d+e x) \log \left (c (d+e x)^n\right )}{e g}+\frac {225 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g}-\frac {(225 f-g h) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^2}-\frac {2 b (225 f-g h) n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^2}+\frac {2 b^2 (225 f-g h) n^2 \text {Li}_3\left (-\frac {g (d+e x)}{e f-d g}\right )}{g^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.34, size = 460, normalized size = 2.14 \[ \frac {e (g h-f i) \log (f+g x) \left (a+b \log \left (c (d+e x)^n\right )-b n \log (d+e x)\right )^2+2 b e g h n \left (\text {Li}_2\left (\frac {g (d+e x)}{d g-e f}\right )+\log (d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )\right ) \left (a+b \log \left (c (d+e x)^n\right )-b n \log (d+e x)\right )-2 b i n \left (e f \left (\text {Li}_2\left (\frac {g (d+e x)}{d g-e f}\right )+\log (d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )\right )-g (d+e x) (\log (d+e x)-1)\right ) \left (a+b \log \left (c (d+e x)^n\right )-b n \log (d+e x)\right )+e g i x \left (a+b \log \left (c (d+e x)^n\right )-b n \log (d+e x)\right )^2+b^2 e g h n^2 \left (-2 \text {Li}_3\left (\frac {g (d+e x)}{d g-e f}\right )+2 \log (d+e x) \text {Li}_2\left (\frac {g (d+e x)}{d g-e f}\right )+\log ^2(d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )\right )+b^2 i n^2 \left (g \left ((d+e x) \log ^2(d+e x)-2 (d+e x) \log (d+e x)+2 e x\right )-e f \left (-2 \text {Li}_3\left (\frac {g (d+e x)}{d g-e f}\right )+2 \log (d+e x) \text {Li}_2\left (\frac {g (d+e x)}{d g-e f}\right )+\log ^2(d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )\right )\right )}{e g^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((h + i*x)*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x),x]

[Out]

(e*g*i*x*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + e*(g*h - f*i)*(a - b*n*Log[d + e*x] + b*Log[c*(d +
e*x)^n])^2*Log[f + g*x] + 2*b*e*g*h*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(Log[d + e*x]*Log[(e*(f +
g*x))/(e*f - d*g)] + PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)]) - 2*b*i*n*(a - b*n*Log[d + e*x] + b*Log[c*(d +
e*x)^n])*(-(g*(d + e*x)*(-1 + Log[d + e*x])) + e*f*(Log[d + e*x]*Log[(e*(f + g*x))/(e*f - d*g)] + PolyLog[2, (
g*(d + e*x))/(-(e*f) + d*g)])) + b^2*i*n^2*(g*(2*e*x - 2*(d + e*x)*Log[d + e*x] + (d + e*x)*Log[d + e*x]^2) -
e*f*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] + 2*Log[d + e*x]*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] -
 2*PolyLog[3, (g*(d + e*x))/(-(e*f) + d*g)])) + b^2*e*g*h*n^2*(Log[d + e*x]^2*Log[(e*(f + g*x))/(e*f - d*g)] +
 2*Log[d + e*x]*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] - 2*PolyLog[3, (g*(d + e*x))/(-(e*f) + d*g)]))/(e*g^2
)

________________________________________________________________________________________

fricas [F]  time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {a^{2} i x + a^{2} h + {\left (b^{2} i x + b^{2} h\right )} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, {\left (a b i x + a b h\right )} \log \left ({\left (e x + d\right )}^{n} c\right )}{g x + f}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="fricas")

[Out]

integral((a^2*i*x + a^2*h + (b^2*i*x + b^2*h)*log((e*x + d)^n*c)^2 + 2*(a*b*i*x + a*b*h)*log((e*x + d)^n*c))/(
g*x + f), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (i x + h\right )} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{g x + f}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="giac")

[Out]

integrate((i*x + h)*(b*log((e*x + d)^n*c) + a)^2/(g*x + f), x)

________________________________________________________________________________________

maple [F]  time = 1.78, size = 0, normalized size = 0.00 \[ \int \frac {\left (i x +h \right ) \left (b \ln \left (c \left (e x +d \right )^{n}\right )+a \right )^{2}}{g x +f}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((i*x+h)*(b*ln(c*(e*x+d)^n)+a)^2/(g*x+f),x)

[Out]

int((i*x+h)*(b*ln(c*(e*x+d)^n)+a)^2/(g*x+f),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} i {\left (\frac {x}{g} - \frac {f \log \left (g x + f\right )}{g^{2}}\right )} + \frac {a^{2} h \log \left (g x + f\right )}{g} + \int \frac {b^{2} h \log \relax (c)^{2} + 2 \, a b h \log \relax (c) + {\left (b^{2} i x + b^{2} h\right )} \log \left ({\left (e x + d\right )}^{n}\right )^{2} + {\left (b^{2} i \log \relax (c)^{2} + 2 \, a b i \log \relax (c)\right )} x + 2 \, {\left (b^{2} h \log \relax (c) + a b h + {\left (b^{2} i \log \relax (c) + a b i\right )} x\right )} \log \left ({\left (e x + d\right )}^{n}\right )}{g x + f}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(e*x+d)^n))^2/(g*x+f),x, algorithm="maxima")

[Out]

a^2*i*(x/g - f*log(g*x + f)/g^2) + a^2*h*log(g*x + f)/g + integrate((b^2*h*log(c)^2 + 2*a*b*h*log(c) + (b^2*i*
x + b^2*h)*log((e*x + d)^n)^2 + (b^2*i*log(c)^2 + 2*a*b*i*log(c))*x + 2*(b^2*h*log(c) + a*b*h + (b^2*i*log(c)
+ a*b*i)*x)*log((e*x + d)^n))/(g*x + f), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\left (h+i\,x\right )\,{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{f+g\,x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((h + i*x)*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x),x)

[Out]

int(((h + i*x)*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{2} \left (h + i x\right )}{f + g x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*ln(c*(e*x+d)**n))**2/(g*x+f),x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))**2*(h + i*x)/(f + g*x), x)

________________________________________________________________________________________